#ifndef CUSTOMER_H_
#define CUSTOMER_H_

#include <string>
#include <sstream>
#include "Address.h"

using namespace std;

struct Customer {
public:
    /**
     * Constructor
     */
    Customer() { // RA S2
    }
    
    /**
     * Constructor
     * @param id Customer id
     * @param n Customer name
     * @param a Customer address
     */
    Customer(int id, string n, Address a) : cust_id(id), cust_name(n), addr(a) { // RA A1
    }

    // utility functions
    string display() const { // RA S2
        stringstream ss;
        ss << cust_id << " " << cust_name << " " << addr.get_number() << " " << addr.get_street() << " " << addr.get_postal_code();
        return ss.str();
    }

    // getter
    int get_cust_id() const { // RA S2
        return cust_id;
    }

    string get_cust_name() const {  // RA S2
        return cust_name;
    }

    Address get_addr() const {  // RA S2
        return addr;
    }

private:
    //constants

    // private data
    int cust_id;
    string cust_name;
    Address addr;
};

#endif //CUSTOMER_H_
